import http from "@/api";

import { ModuleMainUrl } from "..";

const moduleUrl = ModuleMainUrl;

// * 获取企业每天关于用户-岗位的统计信息
export const getCompanyDayJobsCntApi = (type: number) => {
  return http.post(moduleUrl + `/cpyrpt/userjobcntdetail`, { type });
};

// * 获取企业每天关于用户-工友的统计信息
export const getCompanyDayUsersCntApi = (type: number) => {
  return http.post(moduleUrl + `/cpyrpt/usercntdetail`, { type });
};

// * 获取企业用户每天岗位的统计信息
export const getCompanyUsersJobCntApi = (params: { type: number }) => {
  return http.post(moduleUrl + `/cpyrpt/cpyusrjobcnt`, params);
};

/** 获取用户分享的统计列表*/
export const getUserShareVoListApi = (params: {}) => {
  return http.post(moduleUrl + `/sysmpshare/mprpt1`, params);
};

/** 获取用户分享详情的统计列表*/
export const getUserShareDetailsApi = (params: {}) => {
  return http.post(moduleUrl + `/sysmpshare/mprptdetail1`, params);
};

/** 获取用户分享详情的统计列表*/
export const getUserShareDetailPersentApi = (params: {}) => {
  return http.post(moduleUrl + `/sysmpshare/mprptdetail2`, params);
};

/** 获取企业子帐号的统计信息 */
export const getCompanyUsersApi = (params: {}) => {
  return http.post(moduleUrl + `/cpyrpt/cpyactRpt1`, params);
};

/** 查找企业用户分享的统计数 */
export const getUserShareCntApi = (params: {}) => {
  return http.post(moduleUrl + `/sysmpshare/mpsharecnt`, params);
};

/** 修改帐号是否可以获取积分 */
export const changeUserFlagIntegralApi = (params: {}) => {
  return http.post(moduleUrl + `/sysmpshare/mpshareflagitg`, params);
};

/** 获取用户分享的统计列表*/
export const getShareUsersVoListApi = (params: {}) => {
  return http.post(moduleUrl + `/sysmpshare/sharetousers`, params);
};
